<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2024/5/23
 * Time: 10:51
 */

namespace app\common\lib;


use Monolog\Logger;
use support\Log;

class Logs extends Log
{
    /**
     * Channel.
     * @param string $name
     * @return Logger
     */
    public static function channel(string $name = 'default'): Logger
    {
        $config = config('log', [])[$name];
        $handlers = self::handlers($config);
        $processors = self::processors($config);

        return new Logger($name, $handlers, $processors);

    }
}